import React, { Component } from "react";
import { Carousel } from "antd";

import PropTypes from "prop-types";
import bannerStyle from './banner.module.css'

export default class Banner extends Component {
  render() {
    return (
      <Carousel autoplay>
        {this.props.arr.map((item) => {
          return (
            <div key={item.id} className={bannerStyle.img}>
              <img src={item.img} alt="" height="528px"></img>
            </div>
          );
        })}
      </Carousel>
    );
  }
}
Banner.propTypes = {
  arr: PropTypes.array.isRequired,
};
